package com.nut.spp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.nut.spp.entity.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {

    IPage<Goods> listPage(Page page,
                          @Param("type") Integer type,
                          @Param("status") Integer status,
                          @Param("title") String title);

    @Select("select * from biz_goods where type=#{type} and status=2 and deleted=0 order by sort desc")
    List<Goods> list(@Param("type") Integer type);

}